# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Yen Chi Hsuan <yan12125 at gmail.com>
# Contributor: rich_o <rich_o@lavabit.com>
# Contributor: Jason St. John <jstjohn .. purdue . edu>
# Contributor: Daniel YC Lin <dlin.tw at gmail>

pkgname=python-texttable
pkgver=1.6.7
pkgrel=2
pkgdesc="Generate a formatted text table using ASCII characters"
arch=('any')
url="https://pypi.python.org/pypi/texttable/"
license=('LGPL')
depends=('python')
optdepends=('python-cjkwrap: for better CJK support')
makedepends=('python-cjkwrap' 'python-setuptools')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::https://github.com/foutaise/texttable/archive/v$pkgver.tar.gz")
sha512sums=('204dcad0d2438dab8880088d1ea6ab1d0a5d81348294547a6967938bf8e1c27a6c5f91c59c2fe22ce8d1266d7efdb165749e0aebc738644215ab9b1d5a28c419')

build() {
  cd texttable-$pkgver
  python setup.py build
}

check() {
  cd texttable-$pkgver
  pytest tests.py
}

package() {
  cd texttable-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
